<template>
  <div class="ad-section" :class="!showModule? 'hidden-content' : ''">
    <div class="ad-content" v-if="showModule">
      <img :src="adConfig.imgSrc" alt="" v-if="adConfig.imgSrc != ''" />
      <img
        src="@/assets/images/diy/default_img.png"
        alt=""
        v-else
      />
    </div>
    <div class="hold-place" v-if="showModule"></div>
  </div>
</template>

<script>
export default {
  name: "",
  props: {
    propsData: {
      type: Object,
      default: {},
    },
  },
  mixins: [],
  components: {},
  data() {
    return {};
  },
  mounted() {},
  watch: {},
  computed: {
    adConfig() {
      return this.propsData.params.abConfig || {};
    },
    showModule() {
      return this.propsData.params.showModule;
    },
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.ad-section {
  width: 100%;
  min-height: 77px;
  overflow: hidden;
  position: relative;
  z-index: 301;
  padding: 15px 16px;

  .ad-content {
    width: 100%;
    position: absolute;
    min-height: 77px;
    left: 0;
    top: 0;
    z-index: 301;
    padding: 15px 16px;
  }
  .hold-place {
    width: 100%;
    height: 77px;
  }
  img {
    width: 100%;
    height: 77px;
    display: block;
    border-radius: 5px;
    background-color: #9130fc;
  }
}
.hidden-content{
  min-height: inherit;
  padding: 0 0 8px 0;
}
</style>
